import request from "@/utils/request"

// 播放列表头部和内容
export const reqPlayHeaderList = (id : number) => {
    return request.get<any , any>(`/m-revision/page/album/v2/queryAlbumPage/${id}`)
}
// 播放列表播放内容
// ● https://m.ximalaya.com
export const reqPlayList = (albumId : number , asc : boolean) => {
    return request.get<any , any>(`/m-revision/common/album/queryAlbumTrackRecordsByPage?albumId=${albumId}&page=1&pageSize=10&asc=${asc}&countKeys=play%2Ccomment&v=${Date.now()}`)
}

// 主播
// https://m.ximalaya.com
export const reqAnchorList = (anchorId : number) => {
    return request.get<any , any>(`/m-revision/common/user/queryUserInfo/${anchorId}?userCountKeys=follower`)
}

// 主播作品
// ● https://m.ximalaya.com
export const reqAnchorWorks = (anchorId : number , asc : boolean) => {
    return request.get<any , any>(`/m-revision/common/anchor/queryAnchorAlbumsByPage?anchorId=${anchorId}&page=1&pageSize=3&asc=${asc}`)
}

// 作品评论
// ● https://m.ximalaya.com
export const reqComment = (albumId : number ) => {
    return request.get<any , any>(`/m-revision/common/album/queryAlbumCommentsByPage?page=1&pageSize=10&albumId=${albumId}&v=${Date.now()}`)
}

// 相似专辑
// https://m.ximalaya.com
export const reqAlbum = (kw : string , spellchecker : boolean) => {
    return request.get<any , any>(`/revision/search/seo?kw=${kw}&page=1&rows=6&device=iPhone&condition=relation&spellchecker=${spellchecker}&core=album`)
}